<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>xmake v2.3.6 发布, 新增fortran编译支持</title>
    <meta name="description" content="这个版本重点对其他语言的支持做了一些改进，比如新增了fortran的编译支持，zig语言的实验性支持，另外对golang/dlang增加了第三方依赖包支持以及交叉编译支持。虽然，xmake重点关注c/c++的构建支持，但是其他语言的支持xmake也会不定期做一些改进，其主要目的并不是替代它们官方自身的构建系统，仅...">

    
    <meta name="keywords" content="xmake,lua,C/C++,toolchains,fortran,zig,golang,dlang,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/cn/2020/07/28/xmake-update-v2.3.6/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />

    <!-- css -->
    <link href="/css/reward.css" rel="stylesheet" type="text/css"> 




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/cn" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/?lang=0">
                    
                        <i class="fa fa-home"></i>English
                    </a>
                </li>

                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>项目
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/archive/">
                            
                        
                            <i class="fa fa-archive"></i>归档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/category/">
                            
                        
                            <i class="fa fa-th-list"></i>分类
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/tag/">
                            
                        
                            <i class="fa fa-tags"></i>标记
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/docs/">
                            
                        
                            <i class="fa fa-book"></i>文档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="https://xmake.io/#/zh-cn/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>社区
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/donation/">
                            
                        
                            <i class="fa fa-heart"></i>捐助
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/about/">
                            
                        
                            <i class="fa fa-user"></i>关于
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>xmake v2.3.6 发布, 新增fortran编译支持</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2020-07-28
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a-->
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <!--a href="/tag/#lua" title="Tag: lua" rel="tag">lua</a-->
        <a href="/cn/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <!--a href="/tag/#C%2FC%2B%2B" title="Tag: C/C++" rel="tag">C/C++</a-->
        <a href="/cn/tag/#C/C++" title="Tag: C/C++" rel="tag">C/C++</a>&nbsp;
    
        <!--a href="/tag/#toolchains" title="Tag: toolchains" rel="tag">toolchains</a-->
        <a href="/cn/tag/#toolchains" title="Tag: toolchains" rel="tag">toolchains</a>&nbsp;
    
        <!--a href="/tag/#fortran" title="Tag: fortran" rel="tag">fortran</a-->
        <a href="/cn/tag/#fortran" title="Tag: fortran" rel="tag">fortran</a>&nbsp;
    
        <!--a href="/tag/#zig" title="Tag: zig" rel="tag">zig</a-->
        <a href="/cn/tag/#zig" title="Tag: zig" rel="tag">zig</a>&nbsp;
    
        <!--a href="/tag/#golang" title="Tag: golang" rel="tag">golang</a-->
        <a href="/cn/tag/#golang" title="Tag: golang" rel="tag">golang</a>&nbsp;
    
        <!--a href="/tag/#dlang" title="Tag: dlang" rel="tag">dlang</a-->
        <a href="/cn/tag/#dlang" title="Tag: dlang" rel="tag">dlang</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <p>这个版本重点对其他语言的支持做了一些改进，比如新增了fortran的编译支持，zig语言的实验性支持，另外对golang/dlang增加了第三方依赖包支持以及交叉编译支持。</p>

<p>虽然，xmake重点关注c/c++的构建支持，但是其他语言的支持xmake也会不定期做一些改进，其主要目的并不是替代它们官方自身的构建系统，仅仅只是为了支持与c/c++的混合编译，更好的为c/c++项目服务，
毕竟有些c/c++项目中，还是会偶尔调用其他语言的代码接口，比如与cuda, dlang, objc，swift, asm等语言的混合调用，所以xmake还是会对他们做一些基础性的编译支持。</p>

<p>另外，关于c/c++方面，我们也对vs预览版中新的<code class="highlighter-rouge">/sourceDependencies xxx.json</code>输出的头文件依赖格式也做了支持（这对于多语言下，头文件依赖检测会更加的可靠稳定）。</p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">项目源码</a></li>
  <li><a href="https://xmake.io/#/zh-cn/">官方文档</a></li>
</ul>

<p><img src="https://xmake.io/assets/img/index/xmake-basic-render.gif" alt="" /></p>

<h2 id="新特性介绍">新特性介绍</h2>

<h3 id="fortran语言编译支持">Fortran语言编译支持</h3>

<p>这个版本开始，我们已经完全支持使用gfortran编译器来编译fortran项目，我们可以通过下面的命令，快速创建一个基于fortran的空工程：</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code><span class="w">$ </span><span class="nc">xmake</span><span class="kv"> create -l fortran -t console test
</span></code></pre>
</div>

<p>它的xmake.lua内容如下：</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.f90"</span><span class="p">)</span>
</code></pre>
</div>

<p>更多代码例子可以到这里查看：<a href="https://github.com/xmake-io/xmake/tree/master/tests/projects/fortran">Fortran Examples</a></p>

<h3 id="zig语言实验性支持">Zig语言实验性支持</h3>

<p>注：目前这个语言xmake还在试验性支持阶段，还很不完善，比如：windows上不支持，linux/macOS下动态库编译还不支持，请自行评估使用。</p>

<p>我们可以通过下面的配置方式，尝试性体验下，至少linux/macOS下console和static library程序还是可以跑的。</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.zig"</span><span class="p">)</span>
</code></pre>
</div>

<p>至于为啥windows不支持呢，详情见我之前提给zig的issues，<a href="https://github.com/ziglang/zig/issues/5825">#5825</a></p>

<p>而动态库不支持，也是因为我躺了一些坑（zig生成的动态库会自动追加<code class="highlighter-rouge">.0.0.0</code>），详情见：<a href="https://github.com/ziglang/zig/issues/5827">issue 5827</a></p>

<p>另外还躺了下其他坑，个人感觉坑有点多，所以我暂时还是试验阶段，等过段时间再看看。</p>

<p>更多例子见：<a href="https://github.com/xmake-io/xmake/tree/master/tests/projects/zig">Zig Examples</a></p>

<h3 id="go依赖包和交叉编译支持">Go依赖包和交叉编译支持</h3>

<p>新版本xmake对go构建支持继续做了一些改进，比如对go的交叉编译也进行了支持，例如我们可以在macOS和linux上编译windows程序：</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code><span class="w">$ </span><span class="nc">xmake</span><span class="kv"> f -p windows -a x86
</span></code></pre>
</div>

<p>另外，新版本对go的第三方依赖包管理也进行了初步支持：</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>

<span class="n">add_requires</span><span class="p">(</span><span class="s2">"go::github.com/sirupsen/logrus"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"logrus"</span><span class="p">})</span>
<span class="n">add_requires</span><span class="p">(</span><span class="s2">"go::golang.org/x/sys/internal/unsafeheader"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"unsafeheader"</span><span class="p">})</span>
<span class="k">if</span> <span class="n">is_plat</span><span class="p">(</span><span class="s2">"windows"</span><span class="p">)</span> <span class="k">then</span>
    <span class="n">add_requires</span><span class="p">(</span><span class="s2">"go::golang.org/x/sys/windows"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"syshost"</span><span class="p">})</span>
<span class="k">else</span>
    <span class="n">add_requires</span><span class="p">(</span><span class="s2">"go::golang.org/x/sys/unix"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"syshost"</span><span class="p">})</span>
<span class="k">end</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.go"</span><span class="p">)</span>
    <span class="n">add_packages</span><span class="p">(</span><span class="s2">"logrus"</span><span class="p">,</span> <span class="s2">"syshost"</span><span class="p">,</span> <span class="s2">"unsafeheader"</span><span class="p">)</span>
</code></pre>
</div>

<p>不过还有一些不完善的地方，比如目前必须手动配置所有级联依赖包，会稍微繁琐些，后续有待改进。</p>

<p>更多例子见：<a href="https://github.com/xmake-io/xmake/tree/master/tests/projects/go">Go Examples</a></p>

<h3 id="dlangdub依赖包支持">Dlang/Dub依赖包支持</h3>

<p>xmake对dlang的dub包管理也进行了支持，可以快速集成dlang的第三方依赖包：</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>

<span class="n">add_requires</span><span class="p">(</span><span class="s2">"dub::log 0.4.3"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"log"</span><span class="p">})</span>
<span class="n">add_requires</span><span class="p">(</span><span class="s2">"dub::dateparser"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"dateparser"</span><span class="p">})</span>
<span class="n">add_requires</span><span class="p">(</span><span class="s2">"dub::emsi_containers"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"emsi_containers"</span><span class="p">})</span>
<span class="n">add_requires</span><span class="p">(</span><span class="s2">"dub::stdx-allocator"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"stdx-allocator"</span><span class="p">})</span>
<span class="n">add_requires</span><span class="p">(</span><span class="s2">"dub::mir-core"</span><span class="p">,</span> <span class="p">{</span><span class="n">alias</span> <span class="o">=</span> <span class="s2">"mir-core"</span><span class="p">})</span>

<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.d"</span><span class="p">)</span>
    <span class="n">add_packages</span><span class="p">(</span><span class="s2">"log"</span><span class="p">,</span> <span class="s2">"dateparser"</span><span class="p">,</span> <span class="s2">"emsi_containers"</span><span class="p">,</span> <span class="s2">"stdx-allocator"</span><span class="p">,</span> <span class="s2">"mir-core"</span><span class="p">)</span>
</code></pre>
</div>

<h3 id="clexe新的头文件依赖文件支持">cl.exe新的头文件依赖文件支持</h3>

<p>msvc的头文件依赖通常需要解析<code class="highlighter-rouge">/showIncludes</code>的输出内容，提取里面的includes文件列表来处理依赖编译问题，但是呢，cl.exe对这个的输出做的很不好，includes信息和编译输出是混在一起的。</p>

<p>对构建工具处理依赖解析非常不友好，尤其是多语言环境下，如何判断是includes，需要通过前置的<code class="highlighter-rouge">Note: including file: </code>字符串来判断提取，但中文下，又是<code class="highlighter-rouge">注意: 包含文件: </code>，
如果换成日语环境，又是日文的前缀字符串，编码格式问题、硬编码问题导致解析处理上，总归不是很完美。</p>

<p>关于这一点，最新的vs2019预览版中，微软终于对齐做了改进，通过新的<code class="highlighter-rouge">/sourceDependencies xxx.json</code>编译选项，可以更好的输出includes依赖信息，方便多语言环境下的解析提取。</p>

<p>另外，这个新选项的输出是独立到单独的json文件中去的，终于不是跟编译输出混一起了，也终于不用痛苦地解析分离编译错误、警告信息、includes列表信息了。</p>

<p>输出内容大概长这样：</p>

<div class="highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w">
    </span><span class="nt">"Version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.0"</span><span class="p">,</span><span class="w">
    </span><span class="nt">"Data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
        </span><span class="nt">"Source"</span><span class="p">:</span><span class="w"> </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\tbox.c"</span><span class="p">,</span><span class="w">
        </span><span class="nt">"Includes"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
            </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\tbox.h"</span><span class="p">,</span><span class="w">
            </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\prefix.h"</span><span class="p">,</span><span class="w">
            </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\prefix\\prefix.h"</span><span class="p">,</span><span class="w">
            </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\prefix\\config.h"</span><span class="p">,</span><span class="w">
            </span><span class="s2">"z:\\personal\\tbox\\src\\tbox\\config.h"</span><span class="p">,</span><span class="w">
            </span><span class="err">...</span><span class="w">
</span></code></pre>
</div>

<p>而新版本中，xmake通过新增内置的<code class="highlighter-rouge">core.base.json</code>模块处理json解析，很方便地对新的头文件依赖数据进行解析和支持，优先使用此模式（如果cl是新版本支持的话，老版本cl还是使用<code class="highlighter-rouge">/showIncludes</code>）。</p>

<h3 id="xcode插件生成支持">Xcode插件生成支持</h3>

<p>目前，我们还没有时间去自己实现xcode工程的生成，但不代表不支持，因为xmake支持生成cmakelists.txt文件，而cmake是支持xcode工程文件生成的，在官方还没有实现之前，
我们也可以通过cmake变相支持它，xmake会自动内部调用cmake中转下生成结果，对用户而言使用上没啥区别，只需要确保cmake已经安装即可：</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code><span class="w">$ </span><span class="nc">xmake</span><span class="kv"> project -k xcode
</span></code></pre>
</div>

<p>!&gt; 等之后有时间，我们会重新自己实现各更加完善的xcode输出插件，也欢迎大家帮忙贡献。</p>

<h3 id="xmake-vscode插件intellisense支持">xmake-vscode插件intellisense支持</h3>

<p>近期，我们也更新了下<a href="https://github.com/xmake-io/xmake-vscode">xmake-vscode</a>插件，通过自动生成<code class="highlighter-rouge">compile_commands.json</code>到当前项目的<code class="highlighter-rouge">.vscode</code>目录下，然后我们只需要配置<code class="highlighter-rouge">.vscode/c_cpp_properties.json</code>在里面关联上这个<code class="highlighter-rouge">.vscode/compile_commands.json</code>路径
就能实现intellisense自动提示，同步xmake.lua里面的includedirs等配置信息。</p>

<p>至于，具体怎么生成<code class="highlighter-rouge">c_cpp_properties</code>，官方文档里面有详细说明：https://code.visualstudio.com/docs/cpp/configure-intellisense-crosscompilation</p>

<p>里面的主要配置项：</p>

<div class="highlighter-rouge"><pre class="highlight"><code>  "configurations": [
    {
      "compileCommands": ".vscode/compile_commands.json",
    }
  ],
</code></pre>
</div>

<h2 id="更新内容">更新内容</h2>

<h3 id="新特性">新特性</h3>

<ul>
  <li>添加xcode工程生成器插件，<code class="highlighter-rouge">xmake project -k cmake</code> （当前采用cmake生成）</li>
  <li><a href="https://github.com/xmake-io/xmake/issues/870">#870</a>: 支持gfortran编译器</li>
  <li><a href="https://github.com/xmake-io/xmake/pull/887">#887</a>: 支持zig编译器</li>
  <li><a href="https://github.com/xmake-io/xmake/issues/893">#893</a>: 添加json模块</li>
  <li><a href="https://github.com/xmake-io/xmake/issues/898">#898</a>: 改进golang项目构建，支持交叉编译</li>
  <li><a href="https://github.com/xmake-io/xmake/issues/275">#275</a>: 支持go包管理器去集成第三方go依赖包</li>
  <li><a href="https://github.com/xmake-io/xmake/issues/581">#581</a>: 支持dub包管理器去集成第三方dlang依赖包</li>
</ul>

<h3 id="改进">改进</h3>

<ul>
  <li><a href="https://github.com/xmake-io/xmake/issues/868">#868</a>: 支持新的cl.exe的头文件依赖输出文件格式，<code class="highlighter-rouge">/sourceDependencies xxx.json</code></li>
  <li><a href="https://github.com/xmake-io/xmake/issues/902">#902</a>: 改进交叉编译工具链</li>
</ul>


        </article>
        <hr>

        <!-- baidu ads -->
        

        <!-- reward -->
        <div style="text-align: center;">
            <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
              <span>赏</span>
            </button>
            <div id="QR" style="display: none;">
                <div id="wechat" style="display: inline-block">
                  <img id="wechat_qr" src="/static/img/weixin.png" alt="WeChat Pay"/>
                  <p>微信打赏</p>
                </div>
                <div id="alipay" style="display: inline-block">
                  <img id="alipay_qr" src="/static/img/alipay.png" alt="Alipay"/>
                  <p>支付宝打赏</p>
                </div>
            </div>
        </div>

        
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
                    
                    <h2 id="english">English</h2>
                    <ul>
                    
                    <li class="relatedPost">
                        <a href="/2020/07/28/xmake-update-v2.3.6/">xmake v2.3.6 released, Added fortran compilation support
                        
                        </a>
                    </li>
                    
                    
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
        
            </ul>
        

        
        
            
        
            
            
            
                
                    
                        
                        <h2 id="similar_posts">相关文章</h2>
                        <ul>
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/17/xmake-update-v2.6.2/">xmake v2.6.2 发布，新增 Linux 内核驱动模块构建支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 发布，使用 Lua5.4 运行时，Rust 和 C++ 混合编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 发布，改进 C++20 模块，并支持 Nim, Keil MDK 和 Unity Build
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 发布，新增 Pascal/Swig 程序和 Lua53 运行时支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 发布，包依赖锁定和 Vala/Metal 语言编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
        
            </ul>
        

        <div class="post-recent">
    <div class="pre">

        

        

        
        
        <p><strong>上一篇</strong> <a href="/cn/2020/07/18/quickstart-12-custom-scripts/">xmake从入门到精通12：通过自定义脚本实现更灵活地配置</a></p>
        
    </div>

    <div class="nex">

        

        

        
        
        

        

        

        
        
        <p><strong>下一篇</strong> <a href="/cn/2020/09/14/xmake-update-v2.3.7/">xmake v2.3.7 发布, 新增 tinyc 和 emscripten 工具链支持</a></p>
        
    </div>
</div>


        <h2 id="comments">评论</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,       
  language: 'zh-CN',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">

            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    内容
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#english">English</a></li>
                    <li><a href="#similar_posts">相关文章</a></li>
                    <li><a href="#comments">评论</a></li>
                </ul>
            </div>


            <!-- baidu ads -->
            
            
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    链接
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- xmake courses -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    xmake 入门课程
                </div>
                <a href="https://xmake.io/#/zh-cn/about/course" target="_blank">
                <img src="/static/img/xmake-course.png" alt="course" width="256" height="193">
                </a>
            </div>

            <!-- qqgroup -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    技术交流群（QQ）
                </div>
                <img src="/static/img/qqgroup.png" alt="qqgroup" width="256" height="284">
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
